package lambda;

public class LambdaDemo3 {
    public static void main(String[] args) {
        Shop shop=new Shop();
        Thread t1=new Thread(shop::buy);
        Thread t2=new Thread(shop::buy);
    }
}
class  Shop{
    public void buy(){
        Thread t=Thread.currentThread();
        System.out.println(t.getName()+"正在执行buy方法");
    }

}
